from django.db import models
from libs.db import BaseModel


class DataWarehouse(BaseModel):
    ''' 数据仓库，存放互联企业的数据
    '''
    organization_id = models.IntegerField('企业id')
    entity_key = models.CharField('实体', max_length=100)
    data_primary_key = models.IntegerField('原始数据主键')
    data = models.JSONField('原始数据')

    class Meta:
        verbose_name = '数据仓库'
        verbose_name_plural = '数据仓库'
        ordering = ('-id',)
